<#--字段声明-->
<#--项目基础包名-->
<#assign AppPackageName = "${cfg.AppPackage}">
<#assign BaseMoudleName = "${package.ModuleName}">
<#assign ModulePackageName = "${cfg.ModulePackage}">
<#assign EntityPrefixName = "${entity?substring(0,entity?length-cfg.EntitySuffix?length)}">
<#--DO-->
<#assign DoName = "${entity}">
<#assign DoPackage = "${package.Entity}">
<#--BO-->
<#assign BoName = "${EntityPrefixName}${cfg.BoSuffix}">
<#assign BoPackage = "${ModulePackageName}.${cfg.BoPackageName}">
<#--DTO-->
<#assign DtoName = "${EntityPrefixName}${cfg.DtoSuffix}">
<#assign DtoPackage = "${ModulePackageName}.${cfg.DtoPackageName}">
<#--正文-->
package ${package.Service};

<#--框架依赖，一般不变-->
import ${AppPackageName}.common.core.vo.PageData;
<#--BO和DTO-->
import ${BoPackage}.${BoName};
import ${DtoPackage}.${DtoName};
<#--DO-->
import ${package.Entity}.${entity};
import ${superServiceClassPackage};

<#--JDK自带-->
import java.util.List;

/**
 * ${table.comment!} 服务类
 *
 * @author ${author}
 * @since ${date}
 */
<#if kotlin>
interface ${table.serviceName} : ${superServiceClass}<${entity}>
<#else>
public interface ${table.serviceName} extends ${superServiceClass}<${entity}> {

    ${BoName} readById(Long id);

    List<${BoName}> readByIds(List<Long> ids);

    List<${BoName}> readList(${DtoName} condition);

    PageData<${BoName}> readPage(Long pageNum, Long pageSize, ${DtoName} condition);

    Long createOne(${DtoName} dto);

    Long updateOne(Long id, ${DtoName} dto);

    Long deleteById(Long id);

    List<Long> deleteByIds(List<Long> ids);
}
</#if>
